{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a=float(input(\"身高 \"))\n",
    "b=float(input(\"体重 \"))\n",
    "def BMI(a,b):\n",
    "    bmi=b/(a**2)\n",
    "    if bmi <=18.5:\n",
    "        return(\"体重过轻\")\n",
    "    elif bmi <=25:\n",
    "        return(\"正常\")\n",
    "    elif bmi <=28:\n",
    "        return(\"过重\")\n",
    "    elif bmi <=32:\n",
    "        return(\"肥胖\")\n",
    "    else:\n",
    "        return(\"严重肥胖\")\n",
    "print(BMI(a,b))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
